import configparser

parser = configparser.ConfigParser()
paths = parser.read('config.txt', encoding='utf-8')

agc_provider_prefix = parser.get('local', 'agc_provider_prefix', fallback='')
agc_provider_suffix = parser.get('local', 'agc_provider_suffix', fallback='').split(',')

redis_is_cluster = parser.getboolean('redis', 'is_cluster', fallback=False)
redis_address = parser.get('redis', 'address', fallback=None)

kafka_address = parser.get('kafka', 'address', fallback=None)

es_address = parser.get('es', 'address', fallback=None)
es_user = parser.get('es', 'user', fallback=None)
es_psw = parser.get('es', 'psw', fallback=None)

multiapp = parser.get('env', 'multiapp', fallback='sys')
place = parser.get('env', 'place', fallback='unknown')
agc_server = parser.get('env', 'ppd_server', fallback='172.18.24.151')

# fb spider配置
fb_spider_tag = parser.get('fb_spider', 'tag', fallback=None)
fb_spider_user_num = parser.getint('fb_spider', 'user_num', fallback=1)

# pdd spider配置
pdd_spider_cli_host = '172.18.30.20'
pdd_spider_qw_key = 'bed76375-12f2-4f06-883d-aa71623bbda5'
pdd_spider_token = '4593151a154bc4e226825053866e7302'
pdd_spider_peoject_id = '16143-SVXRGE'
pdd_screen_control_host = '172.18.24.151'


def onlinesim_api_key():
    return None